Skip to content

More xmake work. - #2055

Merged
nicolasnoble merged 5 commits into
grumpycoders:mainfrom
nicolasnoble:more-xmake
Aug 2, 2026
Merged

More xmake work.#2055
nicolasnoble merged 5 commits into
grumpycoders:mainfrom
nicolasnoble:more-xmake

Conversation

@nicolasnoble

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d9d1758c-756d-415c-aa87-dbb5066a648c

📥 Commits

Reviewing files that changed from the base of the PR and between dab1a80 and 7bc29d4.

📒 Files selected for processing (3)
  • src/mips/modplayer/xmake.lua
  • src/mips/xmake.lua
  • xmake.lua
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/mips/modplayer/xmake.lua
  • xmake.lua
  • src/mips/xmake.lua

📝 Walkthrough

Walkthrough

The change adds shared xmake helpers, MIPS runtime and linker configuration, application and conversion targets, desktop build wiring, support-target filtering, dependency updates, and repository filtering and ignore-rule changes.

Changes

Xmake-based build integration

Layer / File(s) Summary
Shared xmake helpers
tools/xmake/xmake.lua
Adds common build modes, tool configuration, binary dependency validation, and generic conversion orchestration.
Tool conversion targets
tools/authoring/xmake.lua, tools/exe2iso/xmake.lua, tools/ps1-packer/xmake.lua
Adds authoring and ISO conversion targets and migrates PS1 packing to shared conversion rules.
MIPS runtime and linker build
.gitmodules, third_party/xmake-psx, src/mips/xmake.lua, src/mips/common/crt0/cxxglue.c, src/mips/xmake.ld
Adds the xmake-psx submodule, MIPS binary rules, binary-to-C generation, startup support, and linker memory and section definitions.
MIPS application targets
src/mips/psyqo/xmake.lua, src/mips/psyqo/examples/hello/xmake.lua, src/mips/helloworld/xmake.lua, src/mips/modplayer/xmake.lua
Adds Psyqo, hello, helloworld, modplayer, asset, executable, and packaging configurations.
Desktop and support build wiring
xmake.lua, src/support/xmake.lua, src/supportpsx/xmake.lua, src/supportpsx/binloader.cc
Adds the root pcsx-redux target, adjusts support source selection, and casts ELF entry values to uint32_t.
Repository and dependency updates
.github/filter-mips/filter.sh, .gitignore, third_party/luajit, vsprojects/*
Updates history filtering, ignored outputs, the LuaJIT submodule, and Visual Studio package references.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant XmakeTarget
  participant get_binary_dep
  participant NuggetBinary
  participant ConversionTool
  XmakeTarget->>get_binary_dep: resolve binary dependency
  get_binary_dep->>NuggetBinary: validate psx/mipsel binary
  NuggetBinary-->>XmakeTarget: return binary path
  XmakeTarget->>ConversionTool: convert binary to requested output
  ConversionTool-->>XmakeTarget: create converted artifact
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title references xmake but is too vague to identify the primary changes, which include new build configurations and tooling. Use a specific title such as "Add Xmake build configurations and PSX tooling".
Description check ❓ Inconclusive No pull request description was provided, so the changeset has no author-provided summary. Add a brief description of the new Xmake configurations, PSX tooling, and related dependency updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/filter-mips/filter.sh:
- Around line 13-14: Update both git filter-branch find predicates to exclude
descendants of every preserved subtree: uC-sdk, psxlua, and xmake-psx, matching
the existing wildcard exclusions used for EABase and EASTL. Keep the directory
exclusions unchanged and apply the same complete whitelist to both the -delete
and git rm passes.

In `@src/mips/common/crt0/cxxglue.c`:
- Line 164: Update the weak atexit definition to match the standard
int-returning signature, preserving its existing callback parameter and
returning 0 from the stub.

In `@tools/xmake/xmake.lua`:
- Around line 41-51: Update get_binary_dep so binary dependencies are validated
before filtering by the psx/mipsel condition: retain the existing single-binary
check, report a diagnostic when a binary dependency is not a psx target, and
ensure only psx/mipsel binaries are assigned to binary. Remove the unreachable
inner plat check and handle mismatched binary dependencies in reachable control
flow.
- Around line 81-98: Update the depend.on_changed call inside the on_build
callback to track both opts.input and the resolved conversion tool binary at
tooldep:targetfile() as dependency files. Preserve the existing conversion
command and input/output behavior so changes to either the game binary or the
tool trigger regeneration.
- Around line 3-13: Update common_rules() so it no longer directly includes both
src/support and src/supportpsx; rely on src/supportpsx/xmake.lua to include
src/support, or add an appropriate guard to ensure src/support/xmake.lua is
evaluated only once.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e55eff8a-7e2c-4305-ad8c-dce2b8c9f9fe

📥 Commits

Reviewing files that changed from the base of the PR and between f22e4c1 and 1f807b2.

📒 Files selected for processing (17)
  • .github/filter-mips/filter.sh
  • .gitignore
  • .gitmodules
  • src/mips/common/crt0/cxxglue.c
  • src/mips/helloworld/xmake.lua
  • src/mips/psyqo/examples/hello/xmake.lua
  • src/mips/psyqo/xmake.lua
  • src/mips/xmake.ld
  • src/mips/xmake.lua
  • src/support/xmake.lua
  • src/supportpsx/binloader.cc
  • src/supportpsx/xmake.lua
  • third_party/xmake-psx
  • tools/authoring/xmake.lua
  • tools/exe2iso/xmake.lua
  • tools/ps1-packer/xmake.lua
  • tools/xmake/xmake.lua

Comment on lines +13 to +14
git filter-branch -f --tree-filter 'find third_party -depth -not -name uC-sdk -and -not -path third_party/psxlua -and -not -path third_party/EABase -and -not -path third_party/EABase/\* -and -not -path third_party/EASTL -and -not -path third_party/EASTL/\* -and -not -path third_party/xmake-psx -delete || true' --tag-name-filter cat --prune-empty
git filter-branch -f --tree-filter 'find third_party -depth -not -name uC-sdk -and -not -path third_party/psxlua -and -not -path third_party/EABase -and -not -path third_party/EABase/\* -and -not -path third_party/EASTL -and -not -path third_party/EASTL/\* -and -not -path third_party/xmake-psx -exec git rm -f {} \; || true' --tag-name-filter cat --prune-empty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Preserve complete whitelisted subtrees.

Because find runs with -depth, the current predicates preserve only the directory entries for uC-sdk, psxlua, and xmake-psx; their descendants still match and are deleted. The second pass repeats the same faulty filters, so the exported history can lose required dependency sources.

Add /* exclusions for each preserved subtree in both commands, matching the existing EABase/EASTL patterns.

Proposed predicate fix
-find third_party -depth -not -name uC-sdk -and -not -path third_party/psxlua -and -not -path third_party/EABase -and -not -path third_party/EABase/\* -and -not -path third_party/EASTL -and -not -path third_party/EASTL/\* -and -not -path third_party/xmake-psx ...
+find third_party -depth -not -name uC-sdk -and -not -path third_party/uC-sdk/\* -and -not -path third_party/psxlua -and -not -path third_party/psxlua/\* -and -not -path third_party/EABase -and -not -path third_party/EABase/\* -and -not -path third_party/EASTL -and -not -path third_party/EASTL/\* -and -not -path third_party/xmake-psx -and -not -path third_party/xmake-psx/\* ...
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/filter-mips/filter.sh around lines 13 - 14, Update both git
filter-branch find predicates to exclude descendants of every preserved subtree:
uC-sdk, psxlua, and xmake-psx, matching the existing wildcard exclusions used
for EABase and EASTL. Keep the directory exclusions unchanged and apply the same
complete whitelist to both the -delete and git rm passes.

Comment thread src/mips/common/crt0/cxxglue.c Outdated
Comment thread tools/xmake/xmake.lua
Comment thread tools/xmake/xmake.lua
Comment on lines +41 to +51
if dep_target:get("kind") == "binary" and dep_target:get("plat") == "psx" and dep_target:get("arch") == "mipsel" then
if binary then
return nil,
"target can only have one binary dependency, found '" ..
binary:name() .. "' and '" .. dep_target:name() .. "'"
end
if dep_target:get("plat") ~= "psx" then
return nil, "target dependency '" .. dep_target:name() .. "' must be a psx target"
end
binary = dep_target
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Unreachable validation branch in get_binary_dep.

The outer if at Line 41 already requires plat == "psx" before entering this block, so the if dep_target:get("plat") ~= "psx" check at Lines 47-49 can never be true — it's dead code. Any dependency with kind == "binary" but the wrong plat/arch (e.g. a host tool) is silently skipped instead of producing a diagnostic, and this inner check never fires to catch it.

🐛 Proposed fix to make the psx/mipsel validation reachable
-            if dep_target:get("kind") == "binary" and dep_target:get("plat") == "psx" and dep_target:get("arch") == "mipsel" then
-                if binary then
-                    return nil,
-                        "target can only have one binary dependency, found '" ..
-                        binary:name() .. "' and '" .. dep_target:name() .. "'"
-                end
-                if dep_target:get("plat") ~= "psx" then
-                    return nil, "target dependency '" .. dep_target:name() .. "' must be a psx target"
-                end
-                binary = dep_target
-            end
+            if dep_target:get("kind") == "binary" then
+                if dep_target:get("plat") ~= "psx" or dep_target:get("arch") ~= "mipsel" then
+                    return nil, "target dependency '" .. dep_target:name() .. "' must be a psx/mipsel target"
+                end
+                if binary then
+                    return nil,
+                        "target can only have one binary dependency, found '" ..
+                        binary:name() .. "' and '" .. dep_target:name() .. "'"
+                end
+                binary = dep_target
+            end
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if dep_target:get("kind") == "binary" and dep_target:get("plat") == "psx" and dep_target:get("arch") == "mipsel" then
if binary then
return nil,
"target can only have one binary dependency, found '" ..
binary:name() .. "' and '" .. dep_target:name() .. "'"
end
if dep_target:get("plat") ~= "psx" then
return nil, "target dependency '" .. dep_target:name() .. "' must be a psx target"
end
binary = dep_target
end
if dep_target:get("kind") == "binary" then
if dep_target:get("plat") ~= "psx" or dep_target:get("arch") ~= "mipsel" then
return nil, "target dependency '" .. dep_target:name() .. "' must be a psx/mipsel target"
end
if binary then
return nil,
"target can only have one binary dependency, found '" ..
binary:name() .. "' and '" .. dep_target:name() .. "'"
end
binary = dep_target
end
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/xmake/xmake.lua` around lines 41 - 51, Update get_binary_dep so binary
dependencies are validated before filtering by the psx/mipsel condition: retain
the existing single-binary check, report a diagnostic when a binary dependency
is not a psx target, and ensure only psx/mipsel binaries are assigned to binary.
Remove the unreachable inner plat check and handle mismatched binary
dependencies in reachable control flow.

Comment thread tools/xmake/xmake.lua

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/mips/psyqo/xmake.lua`:
- Line 8: Update the set_languages configuration in the Psyqo xmake targets to
use the supported C++20 standard, matching the existing Makefile build and
avoiding C++26 requirements for the MIPS toolchains.

In `@src/mips/xmake.lua`:
- Around line 63-93: Update the nugget.bin2c generation logic around the cfile
and hfile templates to emit and declare the legacy _binary_*_end symbol for each
compat_name, with its value representing the address immediately after the
generated binary data. Preserve the existing _binary_*_start and _binary_*_size
symbols so current consumers remain compatible.

In `@third_party/luajit`:
- Line 1: Update the third_party/luajit dependency to a stable LuaJIT release or
explicitly document vendored-clib-virtual as the intended dependency branch,
then validate the desktop and MIPS LuaJIT/xmake builds against that pinned
commit.

In `@xmake.lua`:
- Around line 86-92: Update the platform-conditional block in the Xmake
configuration to separate macOS, Linux/X11, and Windows handling: keep the
existing macOS sources and frameworks, move clip_x11.cpp and its X11 linker
flags into an explicit Linux branch, and add the Windows clipboard backend with
its required link settings in a dedicated Windows branch. For any other
platform, emit a clear unsupported-platform error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c864739-ccaa-42d3-a01a-068fd7094220

📥 Commits

Reviewing files that changed from the base of the PR and between 1f807b2 and 40813fa.

📒 Files selected for processing (48)
  • .github/filter-mips/filter.sh
  • .gitignore
  • .gitmodules
  • src/mips/common/crt0/cxxglue.c
  • src/mips/helloworld/xmake.lua
  • src/mips/modplayer/xmake.lua
  • src/mips/psyqo/examples/hello/xmake.lua
  • src/mips/psyqo/xmake.lua
  • src/mips/xmake.ld
  • src/mips/xmake.lua
  • src/support/xmake.lua
  • src/supportpsx/binloader.cc
  • src/supportpsx/xmake.lua
  • third_party/luajit
  • third_party/xmake-psx
  • tools/authoring/xmake.lua
  • tools/exe2iso/xmake.lua
  • tools/ps1-packer/xmake.lua
  • tools/xmake/xmake.lua
  • vsprojects/Lua/Lua.vcxproj
  • vsprojects/Lua/packages.config
  • vsprojects/SPU/SPU.vcxproj
  • vsprojects/SPU/packages.config
  • vsprojects/cdrom/cdrom.vcxproj
  • vsprojects/cdrom/packages.config
  • vsprojects/core/core.vcxproj
  • vsprojects/core/packages.config
  • vsprojects/gui/gui.vcxproj
  • vsprojects/gui/packages.config
  • vsprojects/imgui_lua_bindings/imgui_lua_bindings.vcxproj
  • vsprojects/imgui_lua_bindings/packages.config
  • vsprojects/lpeg/lpeg.vcxproj
  • vsprojects/lpeg/packages.config
  • vsprojects/luv/luv.vcxproj
  • vsprojects/luv/packages.config
  • vsprojects/main/main.vcxproj
  • vsprojects/main/packages.config
  • vsprojects/mainthunk/mainthunk.vcxproj
  • vsprojects/mainthunk/packages.config
  • vsprojects/soft/packages.config
  • vsprojects/soft/soft.vcxproj
  • vsprojects/support/packages.config
  • vsprojects/support/support.vcxproj
  • vsprojects/supportpsx/packages.config
  • vsprojects/supportpsx/supportpsx.vcxproj
  • vsprojects/tests/pcsxrunner/packages.config
  • vsprojects/tests/pcsxrunner/pcsxrunner.vcxproj
  • xmake.lua
🚧 Files skipped from review as they are similar to previous changes (15)
  • src/mips/psyqo/examples/hello/xmake.lua
  • .github/filter-mips/filter.sh
  • src/support/xmake.lua
  • src/supportpsx/binloader.cc
  • third_party/xmake-psx
  • tools/exe2iso/xmake.lua
  • src/mips/helloworld/xmake.lua
  • tools/authoring/xmake.lua
  • src/supportpsx/xmake.lua
  • .gitmodules
  • src/mips/common/crt0/cxxglue.c
  • .gitignore
  • tools/ps1-packer/xmake.lua
  • src/mips/xmake.ld
  • tools/xmake/xmake.lua

Comment thread src/mips/psyqo/xmake.lua
set_allowedmodes("debug", "dev", "release")
includes(mips)

set_languages("c++26")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Does the pcsx-redux mipsel-none-elf gcc/clang toolchain support -std=c++26?

💡 Result:

Yes, the PCSX-Redux project supports and actively utilizes mipsel-none-elf GCC toolchains [1][2]. While the project often recommends or utilizes mipsel-linux-gnu toolchains for ease of installation on Linux distributions (such as via g++-mipsel-linux-gnu) [3][1], the documentation explicitly notes that if you are using a different MIPS compiler, such as mipsel-none-elf, you can override standard build variables to support it (e.g., PREFIX=mipsel-none-elf FORMAT=elf32-littlemips) [1][2]. Furthermore, the project provides specific resources to set up a mipsel-none-elf GCC toolchain, including: - Homebrew formulas for macOS to install mipsel-none-elf-gcc and mipsel-none-elf-binutils [4][5]. - A pre-compiled g++-mipsel-none-elf toolchain (version 10.3.0) for Windows users [1][2]. Regarding Clang, while GCC is the primary compiler used for the MIPS target, the project extensively uses Clang/LLVM for building the emulator itself [3][1] and integrates clangd within its recommended development workflow (Visual Studio Code) for code completion and navigation when developing PS1 applications with the PSYQo library [4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Repo files around psyqo xmake:\n'
fd -a 'xmake.lua$|GETTING_STARTED.md|.*mips.*' . | sed -n '1,120p'

printf '\nsrc/mips/psyqo/xmake.lua:\n'
cat -n src/mips/psyqo/xmake.lua | sed -n '1,80p'

printf '\nRelevant references to language/std/compiler/toolchain:\n'
rg -n 'set_languages|c\+\+/c26|c++26|CXXFLAGS|std=c\+\+|mipsel-none-elf|clang|mips' src README.md tools .github 2>/dev/null | sed -n '1,200p'

Repository: grumpycoders/pcsx-redux

Length of output: 33049


🌐 Web query:

mipsel G++ compiler support for C++26 standard flag c++26

💡 Result:

As of August 2, 2026, the G++ compiler provides experimental support for the C++26 standard, which is enabled using the command-line flag -std=c++26 [1][2]. This support is not tied to a specific CPU architecture like mipsel [3][4]. Because G++ is a cross-platform compiler, the -std=c++26 flag is available in any G++ version that implements these features, regardless of whether the target architecture is mipsel, x86_64, or others [1][3]. As of mid-2026, recent versions of the GCC toolchain (such as GCC 16.1) are available for the mipsel-linux-gnu architecture [3][4], and these versions include the -std=c++26 compiler option [1][2]. Please note the following: 1. Experimental Status: GCC's implementation of C++26 features is experimental [1][5]. The compiler may not maintain backward compatibility for features that did not reflect the final ISO standard [1]. 2. Availability: You can enable the standard using -std=c++26, or use -std=gnu++26 if you also require GNU-specific language extensions [1]. 3. Architecture Independence: The C++ standard flag is a feature of the GCC front-end (g++) and is generally consistent across all supported target architectures, provided your cross-compiler toolchain is updated to a version that supports the standard (GCC 14 or later) [1][3].

Citations:


🌐 Web query:

mips g++ c++26 -std=c++26 target support

💡 Result:

As of August 2, 2026, the GNU C++ compiler (g++) continues to provide robust target support for the MIPS architecture [1][2], while also implementing C++26 language and library features [3][4]. 1. C++26 Support: C++26 was officially published in March 2026 [3][4]. GCC 16.1, released in April 2026, provides extensive support for C++26 features, including stable support for reflection [3][4]. Compilers supporting the C++26 standard generally do so in a target-independent manner within the frontend (g++), meaning that if a specific C++26 feature is supported in GCC 16.1, it is available when targeting MIPS, provided the underlying toolchain version is sufficiently recent [3][4]. 2. MIPS Target Support: The GCC project maintains MIPS as a supported target architecture [5]. Modern GCC versions (including GCC 14 and 15, and continuing into the current GCC 16 era) include active support for various MIPS ISA variations (e.g., mips32r6, mips64r6) [2][5]. 3. How to Use: To use C++26 features when targeting MIPS, you must ensure your cross-compilation toolchain is based on a sufficiently recent version of GCC (e.g., GCC 16.1 or later) [4]. You can enable C++26 support by passing the standard flag to the compiler: -std=c++26 Since GCC support for C++ standards is primarily a property of the compiler frontend rather than the machine-specific backend, standard features are generally portable across all architectures supported by GCC, including MIPS, assuming the standard library implementation (such as libstdc++) is also updated to support the relevant C++26 library features [3]. Top results: [3] https://en.wikipedia.org/wiki/C%2B%2B26 [1] http://packages.debian.org/en/trixie/g++-mips-linux-gnu [2] https://tracker.debian.org/pkg/gcc-15-cross-mipsen [4] https://wrocpp.github.io/posts/cpp26-five-weeks/ [5] https://snapshots.sourceware.org/gcc/docs/latest/gcc/MIPS-Options.html

Citations:


Use a supported C++ language standard for the MIPS toolchain.

set_languages("c++26") forces -std=c++26 for psyqo and psyqo.app targets. The referenced MIPS toolchains do not guarantee C++26 support, while the Psyqo Makefile build explicitly uses CXXFLAGS=-std=c++20. Keep these builds on a supported standard unless the selected mipsel-none-elf or mipsel-linux-gnu toolchain is explicitly updated for C++26.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/mips/psyqo/xmake.lua` at line 8, Update the set_languages configuration
in the Psyqo xmake targets to use the supported C++20 standard, matching the
existing Makefile build and avoiding C++26 requirements for the MIPS toolchains.

Comment thread src/mips/xmake.lua
Comment thread third_party/luajit
@@ -1 +1 @@
Subproject commit 8af11e3a45df88bce14e7d5fb1c17901ea9b446d
Subproject commit 07c36331bb4e1140322a6f8d91d53b9c2767ed46

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

old=8af11e3a45df88bce14e7d5fb1c17901ea9b446d
new=07c36331bb4e1140322a6f8d91d53b9c2767ed46

test "$(git ls-tree HEAD third_party/luajit | awk '{print $3}')" = "$new"
git -C third_party/luajit cat-file -e "${old}^{commit}"
git -C third_party/luajit cat-file -e "${new}^{commit}"
git -C third_party/luajit diff --stat "$old" "$new"
git -C third_party/luajit diff --name-status "$old" "$new"
git -C third_party/luajit log --oneline "$old..$new"

Repository: grumpycoders/pcsx-redux

Length of output: 246


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Current submodule entry:\n'
git ls-tree HEAD third_party/luajit || true

printf '\nLocal commits around referenced SHAs:\n'
for ref in third_party/luajit 07c36331bb4e1140322a6f8d91d53b9c2767ed46 8af11e3a45df88bce14e7d5fb1c17901ea9b446d HEAD^; do
  printf \n
  printf '%s: ' "$ref"
  git cat-file -t "$ref" 2>/dev/null || echo 'invalid/missing'
done

printf '\nBranch/tag hints for referenced SHA (tracked refs only):\n'
git for-each-ref --format='%(refname) %(objectname)' refs/remotes/ | rg '07c3633|8af11e3' || true
git branch -a --contains 07c36331bb4e1140322a6f8d91d53b9c2767ed46 2>/dev/null || true

Repository: grumpycoders/pcsx-redux

Length of output: 527


🏁 Script executed:

#!/bin/bash
set -euo pipefail

old=8af11e3a45df88bce14e7d5fb1c17901ea9b446d

printf 'Resolved refs by upstream object existence:\n'
git ls-remote https://github.com/grumpycoders/LuaJIT.git | rg "^(refs/(heads/|tags/)|$old|07c36331bb4e1140322a6f8d91d53b9c2767ed46)\b" || true

printf '\nGit describe from upstream commit if reachable:\n'
git ls-remote https://github.com/grumpycoders/LuaJIT.git 07c36331bb4e1140322a6f8d91d53b9c2767ed46 >/tmp/luajit_new_ref.out || true
if [ -s /tmp/luajit_new_ref.out ]; then
  git ls-remote https://github.com/grumpycoders/LuaJIT.git "$old" >/tmp/luajit_old_ref.out || true
  cat /tmp/luajit_new_ref.out
  cat /tmp/luajit_old_ref.out
  git ls-remote https://github.com/grumpycoders/LuaJIT.git | awk '
    $2=="07c36331bb4e1140322a6f8d91d53b9c2767ed46" || $2=="8af11e3a45df88bce14e7d5fb1c17901ea9b446d" {print}
  ' | sed ':a; s/refs\/heads\///; s/refs\/tags\///; t; $q; N; s/\n/ /; ba'
fi

Repository: grumpycoders/pcsx-redux

Length of output: 328


🌐 Web query:

grumpycoders LuaJIT 07c36331bb4e1140322a6f8d91d53b9c2767ed46 vendored-clib-virtual

💡 Result:

The identifier "vendored-clib-virtual" refers to a specific branch in the GitHub repository grumpycoders/LuaJIT [1]. This branch is used by the pcsx-redux project, which vendors a customized or specifically configured version of LuaJIT [1]. The character string "07c36331bb4e1140322a6f8d91d53b9c2767ed46" appears to be a git commit hash, though it is not directly associated with a widely recognized public repository under the grumpycoders organization in standard search results; it may be a specific internal commit or a reference within that specialized ecosystem [1]. The "vendored-clib-virtual" branch is maintained within the grumpycoders infrastructure to manage their dependencies for the PCSX-Redux project [1].

Citations:


Pin to a release or documented LuaJIT commit for third_party/luajit.

third_party/luajit points to an untagged vendored-clib-virtual branch commit that does not have a stable public anchor. Pin a release or document this branch as the intended dependency, then validate the desktop and MIPS LuaJIT/xmake builds against the pinned commit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@third_party/luajit` at line 1, Update the third_party/luajit dependency to a
stable LuaJIT release or explicitly document vendored-clib-virtual as the
intended dependency branch, then validate the desktop and MIPS LuaJIT/xmake
builds against that pinned commit.

Comment thread xmake.lua
Comment on lines +86 to +92
if is_plat("macosx") then
add_files("src/main/complain.mm", "third_party/clip/clip_osx.mm")
add_frameworks("GLUT", "OpenGL", "CoreFoundation", "Cocoa")
else
add_files("third_party/clip/clip_x11.cpp")
add_ldflags("-lstdc++fs", "-lGL", "-lX11", "-lxcb")
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Split the X11 branch from the Windows branch.

On Windows, is_plat("macosx") is false, so Line 90 adds clip_x11.cpp and Line 91 adds X11 linker flags. This makes the Xmake target select Linux-specific code for Windows. The project documents Windows as a supported desktop platform. (github.com)

Add an explicit Linux/X11 branch. Add the Windows clipboard backend and its required link settings in a separate branch. Return a clear error for unsupported platforms.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xmake.lua` around lines 86 - 92, Update the platform-conditional block in the
Xmake configuration to separate macOS, Linux/X11, and Windows handling: keep the
existing macOS sources and frameworks, move clip_x11.cpp and its X11 linker
flags into an explicit Linux branch, and add the Windows clipboard backend with
its required link settings in a dedicated Windows branch. For any other
platform, emit a clear unsupported-platform error.

nicolasnoble and others added 4 commits August 1, 2026 17:42
# Conflicts:
#	third_party/luajit
#	vsprojects/Lua/Lua.vcxproj
#	vsprojects/Lua/packages.config
#	vsprojects/SPU/SPU.vcxproj
#	vsprojects/SPU/packages.config
#	vsprojects/cdrom/cdrom.vcxproj
#	vsprojects/cdrom/packages.config
#	vsprojects/core/core.vcxproj
#	vsprojects/core/packages.config
#	vsprojects/gui/gui.vcxproj
#	vsprojects/gui/packages.config
#	vsprojects/imgui_lua_bindings/imgui_lua_bindings.vcxproj
#	vsprojects/imgui_lua_bindings/packages.config
#	vsprojects/lpeg/lpeg.vcxproj
#	vsprojects/lpeg/packages.config
#	vsprojects/luv/luv.vcxproj
#	vsprojects/luv/packages.config
#	vsprojects/main/main.vcxproj
#	vsprojects/main/packages.config
#	vsprojects/mainthunk/mainthunk.vcxproj
#	vsprojects/mainthunk/packages.config
#	vsprojects/soft/packages.config
#	vsprojects/soft/soft.vcxproj
#	vsprojects/support/packages.config
#	vsprojects/support/support.vcxproj
#	vsprojects/supportpsx/packages.config
#	vsprojects/supportpsx/supportpsx.vcxproj
#	vsprojects/tests/pcsxrunner/packages.config
#	vsprojects/tests/pcsxrunner/pcsxrunner.vcxproj
bin2c was registering its generated source at config time but only writing it at
build time, so a clean tree never picked it up. modplayer needs a wrapper target
for the ps-exe, as psx.psexe replaces on_build and can't sit on the target doing
the linking. glfw3 and freetype2 are pkg-config names rather than xmake packages,
and only resolved here because the .pc files happen to be installed. The forced
imgui include was going to the whole target instead of just imgui's own sources,
which is what hid assert from ImFileDialog and imgui_md.

Signed-off-by: Nicolas 'Pixel' Noble <nicolas@nobis-crew.org>
@nicolasnoble
nicolasnoble merged commit a415a98 into grumpycoders:main Aug 2, 2026
21 of 22 checks passed
@nicolasnoble
nicolasnoble deleted the more-xmake branch August 2, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant